﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using ZOVNP.Model.Abstracts;

namespace ZOVNP.Engine
{
    [Serializable]
    public class NotNullableFieldIsNullEntityExceptionException : Exception
    {
        public NotNullableFieldIsNullEntityExceptionException(IDomainObject entity)
        {
            Entity = entity;
        }

        public NotNullableFieldIsNullEntityExceptionException(IDomainObject entity, string message) : base(message)
        {
            Entity = entity;
        }

        public NotNullableFieldIsNullEntityExceptionException(IDomainObject entity, string message, Exception inner) : base(message, inner)
        {
            Entity = entity;
        }

        protected NotNullableFieldIsNullEntityExceptionException(
            SerializationInfo info,
            StreamingContext context) : base(info, context)
        {
        }

        public readonly IDomainObject Entity;
    }
}
